// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package resource

import "code.geniusai.org/notebook-manager/pkg/entity"

func (m *Manager) GetUserNotebookId(userId string) (list []string, err error) {
	option := &entity.ProjectListOption{}
	option.UserID = userId

	var notebooks []*entity.Notebook
	_, notebooks, err = m.notebookStore.ListNotebook(option)
	for _, notebook := range notebooks {
		list = append(list, notebook.ID)
	}
	return list, nil
}
